package com.dandan.mobilelover.service.impl;


import java.util.List;

import javax.inject.Inject;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dandan.mobilelover.dao.CategoryRepository;
import com.dandan.mobilelover.entity.Category;
import com.dandan.mobilelover.service.CategoryService;


@Service
@Transactional
public class CotegoryServiceImpl implements CategoryService {

	@Inject
	private CategoryRepository categoryRepository;

	@Override
	public List<Category> findByType(int type) {
		return categoryRepository.findByType(type);
	}

	@Override
	public Category findById(int id) {
		return categoryRepository.findById(id);
	}

	 
}
